#define _CRT_SECURE_NO_WARNINGS

#include "BinaryTree.h"

BTNode* BTBuyNode(BTDataType x)
{
	BTNode* newnode = (BTNode*)malloc(sizeof(BTNode));
	if (newnode == NULL)
	{
		perror("malloc");
		return NULL;
	}
	newnode->data = x;
	newnode->left = newnode->right = NULL;
	return newnode;
}

int main()
{
	BTNode* root = BTBuyNode('A');
	BTNode* nodeB = BTBuyNode('B');
	BTNode* nodeC = BTBuyNode('C');
	BTNode* nodeD = BTBuyNode('D');
	BTNode* nodeE = BTBuyNode('E');
	BTNode* nodeF = BTBuyNode('F');
	root->left = nodeB;
	root->right = nodeC;
	nodeB->left = nodeD;
	//node2->left = nodeE;
	//node2->right = nodeF;

	//PreOrder(root);
	//MidOrder(root);
	//PostOrder(root);
	/*BTNode* ret = BinaryTreeFind(root, 'G');
	if(ret)*/
	//LevelOrder(root);
	//printf("ret = %c", ret->data);
	if (BinaryTreeComplete(root))
	{
		printf("shj");
	}
	else
		printf("bushi ");
	return 0;
}

